# models.py
from sqlmodel import SQLModel, Field

class User(SQLModel, table=True,extend_existing=True):
    __tablename__ = "users"  # 显式指定表名
    id: int | None = Field(default=None, primary_key=True)
    name: str = Field(index=True)
    age: int | None = Field(default=None, ge=0)
    email: str = Field(index=True)
    password: str = Field(index=True)
